Telegram Group & Telegram Channel
πŸ–₯ PowerShell-скрипт для пСрСимСнования .NET-ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°

ΠŸΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅ .NET-ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° β€” занятиС ΡƒΡ‚ΠΎΠΌΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅:
Π½ΡƒΠΆΠ½ΠΎ ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΠΈ, Ρ„Π°ΠΉΠ»Ρ‹, нСэмспСйсы, Π° Ρ‚Π°ΠΊΠΆΠ΅ Π·Π°ΠΌΠ΅Π½ΠΈΡ‚ΡŒ строки Π²Π½ΡƒΡ‚Ρ€ΠΈ .sln ΠΈ .csproj Ρ„Π°ΠΉΠ»ΠΎΠ².

ΠŸΠ΅Ρ€Π΅Π΄ Π²Π°ΠΌΠΈ PowerShell-скрипт, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΡƒΠ΅Ρ‚ΠΏΠ΅Π΅Ρ€ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅: ΠΎΠ½ рСкурсивно ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Ρ‹Π²Π°Π΅Ρ‚ ΠΏΠ°ΠΏΠΊΠΈ ΠΈ Ρ„Π°ΠΉΠ»Ρ‹ ΠΈ замСняСт содСрТимоС Π²Π½ΡƒΡ‚Ρ€ΠΈ:


$ErrorActionPreference = "Stop"

$rootFolder = Resolve-Path -Path "."
$oldName = "Sample.Foo"
$newName = "Sample.Bar"

# Rename files and folders
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse | Sort-Object -Property FullName -Descending) {
$itemNewName = $item.Name.Replace($oldName, $newName)
if ($item.Name -ne $itemNewName) {
Rename-Item -LiteralPath $item.FullName -NewName $itemNewName
}
}

# Replace content in files
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse -Include "*.cmd", "*.cs", "*.csproj", "*.json", "*.md", "*.proj", "*.props", "*.ps1", "*.sln", "*.slnx", "*.targets", "*.txt", "*.vb", "*.vbproj", "*.xaml", "*.xml", "*.xproj", "*.yml", "*.yaml") {
$content = Get-Content -LiteralPath $item.FullName
if ($content) {
$newContent = $content.Replace($oldName, $newName)
Set-Content -LiteralPath $item.FullName -Value $newContent
}
}


@csharp_ci
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/csharp_ci/1357
Create:
Last Update:

πŸ–₯ PowerShell-скрипт для пСрСимСнования .NET-ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°

ΠŸΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅ .NET-ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° β€” занятиС ΡƒΡ‚ΠΎΠΌΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅:
Π½ΡƒΠΆΠ½ΠΎ ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΠΈ, Ρ„Π°ΠΉΠ»Ρ‹, нСэмспСйсы, Π° Ρ‚Π°ΠΊΠΆΠ΅ Π·Π°ΠΌΠ΅Π½ΠΈΡ‚ΡŒ строки Π²Π½ΡƒΡ‚Ρ€ΠΈ .sln ΠΈ .csproj Ρ„Π°ΠΉΠ»ΠΎΠ².

ΠŸΠ΅Ρ€Π΅Π΄ Π²Π°ΠΌΠΈ PowerShell-скрипт, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΡƒΠ΅Ρ‚ΠΏΠ΅Π΅Ρ€ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅: ΠΎΠ½ рСкурсивно ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Ρ‹Π²Π°Π΅Ρ‚ ΠΏΠ°ΠΏΠΊΠΈ ΠΈ Ρ„Π°ΠΉΠ»Ρ‹ ΠΈ замСняСт содСрТимоС Π²Π½ΡƒΡ‚Ρ€ΠΈ:


$ErrorActionPreference = "Stop"

$rootFolder = Resolve-Path -Path "."
$oldName = "Sample.Foo"
$newName = "Sample.Bar"

# Rename files and folders
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse | Sort-Object -Property FullName -Descending) {
$itemNewName = $item.Name.Replace($oldName, $newName)
if ($item.Name -ne $itemNewName) {
Rename-Item -LiteralPath $item.FullName -NewName $itemNewName
}
}

# Replace content in files
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse -Include "*.cmd", "*.cs", "*.csproj", "*.json", "*.md", "*.proj", "*.props", "*.ps1", "*.sln", "*.slnx", "*.targets", "*.txt", "*.vb", "*.vbproj", "*.xaml", "*.xml", "*.xproj", "*.yml", "*.yaml") {
$content = Get-Content -LiteralPath $item.FullName
if ($content) {
$newContent = $content.Replace($oldName, $newName)
Set-Content -LiteralPath $item.FullName -Value $newContent
}
}


@csharp_ci

BY C# (C Sharp) programming


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/csharp_ci/1357

View MORE
Open in Telegram


C C Sharp programming Telegram | DID YOU KNOW?

Date: |

How to Use Bitcoin?

n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. β€œThey have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. β€œIt’s huge.”

At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?

C C Sharp programming from us


Telegram C# (C Sharp) programming
FROM USA